<?php
if(!defined('SABLOG_ROOT')) {
	exit('Access Denied');
}
$query_sql = "SELECT a.*,c.name as cname,c.url as curl, u.username
	FROM {$db_prefix}files_attachments a
	LEFT JOIN {$db_prefix}files_categories c ON c.cid=a.cid
	LEFT JOIN {$db_prefix}users u ON u.userid=a.uid
	LIMIT 0, 30";

$filedb = array();
$query = $DB->query($query_sql);
//无参数时执行的内容
while($file = $DB->fetch_array($query)) {
$file['url'] = $options['url']."attachment.php?id=".$file['attachmentid']."&tb=files";
$file['dateline'] = sadate('Y-m-d',$file['dateline']);
$filedb[] = $file;
}

$options['title'] = "分档分享系统";
$pagefile = 'files';

?>